<template>
    <!--课程详情弹窗-->
    <el-dialog
        title="查看课程"
        width="50%"
        :visible.sync="showCourseDialog"
        @close="cancelDialog"
        append-to-body
    >
        <div class="modal-body">
            <el-row>
                <el-col :span="12">
                    <label class="secondary-text label">{{$t('course.courseCode')+"："}}</label>
                    <span class="majoy-tex span">{{ couseDetail.code }}</span>
                </el-col>
                <el-col :span="12">
                    <label class="secondary-text label">{{$t('course.courseName')+ "："}}</label>
                    <span class="majoy-tex span">{{couseDetail.name}}</span>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <label class="secondary-text label">{{$t('label.totalWeek')+ "："}}</label>
                    <span class="majoy-tex span">{{couseDetail.weeks}}</span>
                </el-col>
                <el-col :span="12">
                    <label class="secondary-text label">{{$t('label.weekHour')+ "："}}</label>
                    <span class="majoy-tex span">{{couseDetail.week_hour}}</span>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <label class="secondary-text label">{{$t('course.period')+ "："}}</label>
                    <span class="majoy-tex span">{{couseDetail.period}}</span>
                </el-col>
                <el-col :span="12">
                    <label class="secondary-text label">{{$t('course.score')+ "："}}</label>
                    <span class="majoy-tex span">{{couseDetail.credits}}</span>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <label class="secondary-text label">{{$t('label.trainingLevel')+ "："}}</label>
                    <span class="majoy-tex span">{{couseDetail.trainingLevelI18n}}</span>
                </el-col>
            </el-row>
            <!-- <el-row>
                <el-col :span="12" class="textCont">
                    <label class="secondary-text label">{{$t('course.introCn')+ "："}}</label>
                    <el-tooltip :content="couseDetail.introductionCourse" placement="bottom-start" effect="light">
                        <span class="majoy-tex span">{{couseDetail.introductionCourse}}</span>
                    </el-tooltip>
                </el-col>
            </el-row> -->
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button  @click="cancelDialog">{{$t("message.close")}}</el-button>
        </div>
    </el-dialog>
</template>
<script>
export default {
    props: {
        name: 'courseDetail',
        couseDetail: {
            type: Object,
            required: true
        },
        showCourseDialog: {
            type: Boolean,
            required: true,
            default: false
        }
    },
    methods: {
        cancelDialog() {
            this.$emit('closeCourseDialog');
        }
    }
}
</script>
<style>
.modal-body .el-row{
    height: 32px;
    line-height: 32px;
}
.modal-body .el-row label{
    width:  100px;
    text-align: right;
    display: inline-block;
}
.modal-body .el-row .textCont{
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
</style>
